// 预加载关键模块
export function preloadCriticalModules() {
  // 预加载主要视图
  import("@/layouts/index.vue")
  import("@/layouts/components/index.ts")
  import("@/layouts/components/Sidebar/index.vue")
  // 预加载 Cesium 相关模块
  import("@@/utils/CustomCesium/CustomCesium.ts")
  import("@/pages/scn/Edit/index.vue")
  import("@/pages/scn/Edit/components/CesiumMap.vue")
  // 预加载首页和常用页面
  import("@/pages/dashboard/index.vue")
  // 预加载资源相关模块
  import("@/pages/intelligent/index.vue")
  import("@/pages/engine-library/index.vue")
  import("@/pages/basicData/index.vue")
  import("@/pages/component/index.vue")
  import("@/pages/entity/index.vue")
  import("@/pages/train/index.vue")

  // 预加载 API 模块
  import("@@/apis/dashboard/index.ts")
  import("@@/apis/entity/index.ts")
  import("@@/apis/sevencode/useFetchSevenCode")
}

// 延迟预加载非关键模块
export function preloadNonCriticalModules() {
  setTimeout(() => {
    // 预加载其他视图
    import("@/pages/scn/index.vue")
  }, 2000)
}
